/********************************************************************
  Copyright: 2011 Alexander Sokoloff <sokoloff.a@gmail.ru>

  This program is free software; you can redistribute it and/or
  modify it under the terms of the GNU General Public License.
  version 2 as published by the Free Software Foundation.

  This program is distributed in the hope that it will be useful,
  but WITHOUT ANY WARRANTY; without even the implied warranty of
  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
  GNU General Public License for more details.

  You should have received a copy of the GNU General Public License
  along with this program; if not, write to the Free Software Foundation,
  Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.

*********************************************************************/

#ifndef PLAYLISTS_H
#define PLAYLISTS_H

#include <QObject>
#include <QtCore/QList>
#include <QtCore/QString>

class StationInfo
{
public:
    explicit StationInfo();
    virtual ~StationInfo();

    QString url() const { return mUrl; }
    void setUrl(const QString& url) { mUrl = url; }

    QString title() const { return mTitle; }
    void setTitle(const QString& title) { mTitle = title; }

protected:
    QString mUrl;
    QString mTitle;
};


class PlayList : public QList<StationInfo*>
{
public:
    explicit PlayList(const QString& fileName);
    virtual ~PlayList();


    //static PlayList* load(const QString& fileName);
    static void loadZ(const QString& fileName);
 //   friend PlayList* load(const QString& fileName);

    virtual bool doLoad() { return false; } // = 0;

protected:
    QString mFileName;
    StationInfo* addStationInfo(const QString& url, const QString& title);
};


class PlsPlayList: public PlayList
{

public:

    explicit PlsPlayList(const QString& fileName);

//protected:
    virtual bool doLoad();

};

#endif // PLAYLISTS_H
